<html>
<head><meta charset="utf-8"><title>Building docs only for current crate · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Building.20docs.20only.20for.20current.20crate.html">Building docs only for current crate</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="212053430"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Building%20docs%20only%20for%20current%20crate/near/212053430" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> apiraino <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Building.20docs.20only.20for.20current.20crate.html#212053430">(Oct 02 2020 at 09:46)</a>:</h4>
<p>Hi, I'm trying to use cargo docs to <em>only</em> build doc for my library (<code>$ cargo doc --open --lib --no-deps</code>) but it doesnt work as expected (I get documentation for all dependencies).</p>
<p>I've found this issue <a href="https://github.com/rust-lang/cargo/issues/2025">cargo#2025</a> which points to a more general tracking issue <a href="https://github.com/rust-lang/cargo/issues/8296">rust-lang#8296</a>. </p>
<p>Am I correct that this is not yet available, right?</p>



<a name="212072194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Building%20docs%20only%20for%20current%20crate/near/212072194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Building.20docs.20only.20for.20current.20crate.html#212072194">(Oct 02 2020 at 13:13)</a>:</h4>
<p>--no-deps should only build for your library</p>



<a name="212072274"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Building%20docs%20only%20for%20current%20crate/near/212072274" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Building.20docs.20only.20for.20current.20crate.html#212072274">(Oct 02 2020 at 13:14)</a>:</h4>
<p>Did you run without --no-deps in the past? Rustdoc will use the cached docs from then if so</p>



<a name="212078452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Building%20docs%20only%20for%20current%20crate/near/212078452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> apiraino <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Building.20docs.20only.20for.20current.20crate.html#212078452">(Oct 02 2020 at 14:03)</a>:</h4>
<p>ahh nice catch! I've deleted <code>./target/doc</code> and rerun the command. Now I only see my crate. thanks :-)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>